// i.d(t, { Tq: () => a, bG: () => c })

import s from "./51263"
import r from "./57051"
import configConst from "../constant/config.const"
import { roomFunc } from "../utils/room.util"
const a = (e, t, i?, n?, ...s) =>
    l({
      sweepData: e,
      direction: t,
      directionFactor: i,
      sourceSweep: n,
      ignoreSweeps: s
    }),
  l = e => {
    const { sweepData: t, direction: i, sourceSweep: n, ignoreSweeps: o, directionFactor: a } = e
    if (!t.currentSweepObject) return []
    const l = n || t.currentSweepObject,
      c = [s.ff(l), s._k(), s.vO(l), s.pI(l.position, i, a)]
    for (const e of o) c.push(s.ff(e))
    const h = [r.o7(l.position, i), r.TE(l.position)],
      d = t.getSweepNeighbours(l)
    return t.sortByScore(c, h, d)
  },
  c = (e, t, i) => {
    const a = [s._k(), s._T()],
      l = [r.Dv(i.point)],
      c = e.currentSweepObject
    t && c && a.push(s.ff(c), s.SF(c.position, configConst.NavigationConfig.longerTransitionMaxDist), s.vO(c)),
      i.face && a.push(s.D5(i.point, i.face.normal)),
      roomFunc.hasFloorId(i.object) && l.push(r.Bv(i.object.floorId))
    const h = e.sortByScore(a, l)
    if (0 === h.length) {
      const t = e.getClosestSweep(i.point, !0)
      h.push({ sweep: t, score: 0 })
    }
    return h
  }
export default { Tq: a, bG: c }
